package com.vhall.component.controller.lottery.facade;


import com.vhall.component.entity.lottery.vo.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 抽奖-控制台
 *
 * @author longzhen.gong
 * @date 2021/6/28 10:55
 */
@FeignClient(name = "LotteryConsoleFacade", path = "/v4/lottery/console")
public interface LotteryConsoleFacade {


    /**
     * 抽奖列表
     *
     * @param lotteryListInfoReqVo
     * @return
     */
    @GetMapping("/gets")
    LotteryGetsRspVO gets(@Validated LotteryListInfoReqVo lotteryListInfoReqVo);

    /**
     * 控制台-获取抽奖中奖人名单
     *
     * @param lotteryUsersGetReqVO
     * @return
     */
    @GetMapping("/users-get")
    LotteryUsersGetRspVO usersGet(@Validated LotteryUsersGetReqVO lotteryUsersGetReqVO);

    /**
     * 控制台-导出中奖人名单
     *
     * @param lotteryExportReqVO
     * @return
     */
    @PostMapping("/export-lottery")
    Boolean exportLottery(@Validated LotteryExportReqVO lotteryExportReqVO);

    /**
     * 删除抽奖中奖用户记录
     *
     * @param accountId
     * @return
     */
    @GetMapping("/del-winner")
    Boolean deleteLotteryUser(@RequestParam(value = "account_id") Integer accountId);

    /**
     * 查询抽奖结果(中奖者信息)
     *
     * @param lotteryId 抽奖ID
     */
    @GetMapping("/get-winner")
    LotteryWinnerPageVO getLotteryWinner(@RequestParam(value = "lottery_id") Integer lotteryId,
                                     @RequestParam(value = "room_id") String roomId,
                                     @RequestParam(value = "page_num") int pageNum,
                                     @RequestParam(value = "page_size") int pageSize);
}
